import request from '@/utils/request'

// 查询经费列表
export function listFunds(query) {
  return request({
    url: '/funds/list',
    method: 'get',
    params: query
  })
}
// 查询经费列表
export function totalSum(query) {
  return request({
    url: '/funds/totalSum',
    method: 'get',
    params: query
  })
}

// 查询经费详细
export function getFunds(fundsId) {
  return request({
    url: '/funds/' + fundsId,
    method: 'get'
  })
}

// 新增经费
export function addFunds(data) {
  return request({
    url: '/funds',
    method: 'post',
    data: data
  })
}

// 修改经费
export function updateFunds(data) {
  return request({
    url: '/funds',
    method: 'put',
    data: data
  })
}

// 删除经费
export function delFunds(fundsId) {
  return request({
    url: '/funds/' + fundsId,
    method: 'delete'
  })
}

// 导出经费
export function exportFunds(query) {
  return request({
    url: '/funds/export',
    method: 'get',
    params: query
  })
}
